import java.util.Random;
import java.util.Scanner;

public class shuangseqiu {
    public static void main(String[] args) {
        int[] arr = createArr();
        for (int i = 0; i < createArr().length; i++) {
            System.out.print(arr[i]+" ");
        }
        int[] userInputArr = userInputArr();
        int redCount = 0;
        int blueCount = 0;
        for (int i = 0; i < arr.length-1; i++) {
            int redNumber = userInputArr[i];
            for (int j = 0; j < arr.length-1; j++) {
                if (redNumber==arr[j]){
                    redCount++;
                    break;
                }
            }
        }
        int blueNumber = userInputArr[6];
        if (blueNumber==arr[6]){
            blueCount++;
        }
        if (redCount==6&&blueCount==1){
            System.out.println("恭喜你中奖1000万");
        } else if (redCount==6&&blueCount==0){
            System.out.println("恭喜你中奖500万");
        }else if (redCount==5&&blueCount==1){
            System.out.println("恭喜你中奖3000");
        }else if ((redCount==5&&blueCount==0)||(redCount==4&&blueCount==1)){
            System.out.println("恭喜你中奖200");
        }else if ((redCount==4&&blueCount==0)||(redCount==3&&blueCount==1)){
            System.out.println("恭喜你中奖10");
        }else if ((redCount==2&&blueCount==1)||(redCount==1&&blueCount==1)||(redCount==0&&blueCount==1)){
            System.out.println("恭喜你中奖5");
        }else{
            System.out.println("谢谢惠顾");
        }
    }

    public static int[] userInputArr() {
        int[] arr = new int[7];
        Scanner sc = new Scanner(System.in);
        for (int i = 0; i < arr.length - 1; i++) {
            System.out.println("输入第" + (i + 1) + "个红球的号码(范围为1-33)");
            int redNumber = sc.nextInt();
            if (redNumber >= 0 && redNumber <= 33) {
                if (!contains(arr, redNumber)) {
                    arr[i] = redNumber;
                } else {
                    System.out.println("号码重复，请重新输入");
                }
            } else {
                System.out.println("号码超出范围，请重新输入");
            }
        }
        System.out.println("输入蓝球号码");
        int blueNumber = sc.nextInt();
        if (blueNumber >= 0 && blueNumber <= 16) {
            arr[6] = blueNumber;
        } else {
            System.out.println("号码超出范围，请重新输入");
        }
        return arr;
    }

    public static int[] createArr() {
        int[] arr = new int[7];
        Random r = new Random();
        for (int i = 0; i < 6; ) {
            int redNumber = r.nextInt(33) + 1;
            if (!contains(arr, redNumber)) {
                arr[i] = redNumber;
                i++;
            }
        }
        int blueNumber = r.nextInt(16) + 1;
        arr[6] = blueNumber;
        return arr;
    }

    public static boolean contains(int[] arr, int number) {
        for (int j : arr) {
            if (j == number) {
                return true;
            }
        }
        return false;
    }
}
